import 'package:riverpod_t/page/home/data/model/cartoon_model_entity.dart';

class MineState {
  final List<CartoonModelDataFeeds> list;
  final int page;
  final bool hasNext;
  final bool loadFinish;
  final int testPage;

  MineState({
    required this.list,
    this.page = 1,
    this.hasNext = true,
    this.loadFinish = false,
    this.testPage = 0,
  });

  MineState copyWith({
    List<CartoonModelDataFeeds>? list,
    int? page,
    bool? hasNext,
    bool? loadFinish,
    int? testPage,
  }) {
    return MineState(
      list: list ?? List.from(this.list), // 深拷贝
      page: page ?? this.page,
      testPage: page ?? this.testPage,
      hasNext: hasNext ?? this.hasNext,
      loadFinish: loadFinish ?? this.loadFinish,
    );
  }
}
